<?php
$v_unit_parent_id = 0;
if(isset($_REQUEST['hdn_parent_item_id'])){
	$v_unit_parent_id = $_REQUEST['hdn_parent_item_id'];
}
$v_unit_id = 0;
if(isset($_REQUEST['hdn_item_id'])){
	$v_unit_id = $_REQUEST['hdn_item_id'];
}
$v_current_position = 0;
if(isset($_REQUEST['hdn_current_position'])){
	$v_current_position = $_REQUEST['hdn_current_position'];
}
if(_is_sqlserver()){
	if($v_unit_id > 0){			
		$cmd = mssql_init("USER_UnitGetSingle",$conn);
		mssql_bind($cmd,"@p_unit_id",$v_unit_id,SQLINT4);
		$result = mssql_execute($cmd);
		$arr_single_unit = _get_row_to_array($result);
	}else{
		$cmd = mssql_init("USER_UnitGetSingle",$conn);
		mssql_bind($cmd,"@p_unit_id",$v_unit_parent_id,SQLINT4);
		$result = mssql_execute($cmd);
		$arr_single_unit = _get_row_to_array($result);
	}	
}	
?>